﻿using System;

namespace Yuchen.NPA.Core.CompilerService.RegularExpression
{
    internal class ConcatNode : Node
    {
        public override NodeType Type { get; } = NodeType.Concat;

        public ConcatNode(Node left, Node right) : base(new[] { left, right })
        {
            if (left == null)
            {
                throw new ArgumentNullException(nameof(left));
            }
            if (right == null)
            {
                throw new ArgumentNullException(nameof(right));
            }
        }

        public override string ToString()
        {
            return $"{Children[0]}{Children[1]}";
        }
    }
}
